package Demo03;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class UserAction  extends ActionSupport{
    @Override
    public String execute() throws Exception {
        List<User> list=new UserDAOImpl().selAll();
        HttpServletRequest request=ServletActionContext.getRequest();
        request.setAttribute("list",list);

        return SUCCESS;
    }
}
